
let homeview: Object = {
  state: {
    navBool: true,
    // 创建控制弹出框的状态
    dialogFormVisible: false,
    tableData: [
      {
        Date: '2016-05-03',
        Type: '住宅',
        Address: '汤臣一品',
        HomeNumber: 101,
        HouseSize: '三房两厅',
        Host: 'Jennie'
      },
      {
        Date: '2016-05-02',
        Type: '住宅',
        Address: '汤臣一品',
        HomeNumber: 101,
        HouseSize: '三房两厅',
        Host: 'Lalisa'
      },
      {
        Date: '2016-05-04',
        Type: '住宅',
        Address: '翻斗花园',
        HomeNumber: 101,
        HouseSize: '三房两厅',
        Host: 'Lalisa'
      },
      {
        Date: '2016-05-01',
        Type: '商铺',
        Address: '翻斗花园',
        HomeNumber: 246,
        HouseSize: '一厨一卫二室',
        Host: 'Lalisa'
      }, {
        Date: '2016-05-03',
        Type: '商铺',
        Address: '翻斗花园',
        HomeNumber: 246,
        HouseSize: '一厨一卫二室',
        Host: 'Lalisa'
      },
      {
        Date: '2016-05-02',
        Type: '商铺',
        Address: '翻斗花园',
        HomeNumber: 246,
        HouseSize: '一厨一卫二室',
        Host: 'Lalisa'
      },
      {
        Date: '2016-05-04',
        Type: '商铺',
        Address: '翻斗花园',
        HomeNumber: 246,
        HouseSize: '一厨一卫二室',
        Host: 'Jennie'
      },
      {
        Date: '2016-05-01',
        Type: '住宅',
        Address: '翻斗花园',
        HomeNumber: 101,
        HouseSize: '三房两厅',
        Host: 'Jennie'
      }, {
        Date: '2016-05-03',
        Type: '住宅',
        Address: '翻斗花园',
        HomeNumber: 101,
        HouseSize: '三房两厅',
        Host: 'Jennie'
      },
      {
        Date: '2016-05-02',
        Type: '凶宅',
        Address: '翻斗花园',
        HomeNumber: 101,
        HouseSize: '三房两厅',
        Host: 'Jennie'
      },
      {
        Date: '2016-05-04',
        Type: '凶宅',
        Address: '汤臣一品',
        HomeNumber: 101,
        HouseSize: '三房两厅',
        Host: 'Jennie'
      },
      {
        Date: '2016-05-01',
        Type: '凶宅',
        Address: '汤臣一品',
        HomeNumber: 101,
        HouseSize: '三房两厅',
        Host: 'Jennie'
      }, {
        Date: '2016-05-03',
        Type: '凶宅',
        Address: '汤臣一品',
        HomeNumber: 101,
        HouseSize: '三房两厅',
        Host: 'Jennie'
      },
      {
        Date: '2016-05-02',
        Type: '凶宅',
        Address: '汤臣一品',
        HomeNumber: 101,
        HouseSize: '三房两厅',
        Host: 'Jennie'
      },
      {
        Date: '2016-05-04',
        Type: '凶宅',
        Address: '汤臣一品',
        HomeNumber: 101,
        HouseSize: '三房两厅',
        Host: 'Jisoo'
      },
      {
        Date: '2016-05-01',
        Type: '住宅',
        Address: '汤臣一品',
        HomeNumber: 101,
        HouseSize: '三房两厅',
        Host: 'Jisoo'
      }, {
        Date: '2016-05-03',
        Type: '住宅',
        Address: '翻斗花园',
        HomeNumber: 101,
        HouseSize: '三房两厅',
        Host: 'Jisoo'
      },
      {
        Date: '2016-05-02',
        Type: '住宅',
        Address: '翻斗花园',
        HomeNumber: 101,
        HouseSize: '三房两厅',
        Host: 'Jisoo'
      },
      {
        Date: '2016-05-04',
        Type: '住宅',
        Address: '翻斗花园',
        HomeNumber: 101,
        HouseSize: '三房两厅',
        Host: 'Jisoo'
      },
      {
        Date: '2016-05-01',
        Type: '住宅',
        Address: '翻斗花园',
        HomeNumber: 101,
        HouseSize: '三房两厅',
        Host: 'Jisoo'
      }, {
        Date: '2016-05-03',
        Type: '住宅',
        Address: '翻斗花园',
        HomeNumber: 101,
        HouseSize: '三房两厅',
        Host: 'Jisoo'
      },
      {
        Date: '2016-05-02',
        Type: '住宅',
        Address: '翻斗花园',
        HomeNumber: 101,
        HouseSize: '三房两厅',
        Host: 'Jisoo'
      },
      {
        Date: '2016-05-04',
        Type: '住宅',
        Address: '翻斗花园',
        HomeNumber: 101,
        HouseSize: '三房两厅',
        Host: 'Jennie'
      },
      {
        Date: '2016-05-01',
        Type: '住宅',
        Address: '翻斗花园',
        HomeNumber: 101,
        HouseSize: '三房两厅',
        Host: 'Jennie'
      }, {
        Date: '2016-05-03',
        Type: '住宅',
        Address: '翻斗花园',
        HomeNumber: 101,
        HouseSize: '三房两厅',
        Host: 'Jennie'
      },
      {
        Date: '2016-05-02',
        Type: '住宅',
        Address: '翻斗花园',
        HomeNumber: 101,
        HouseSize: '三房两厅',
        Host: 'Jennie'
      },
      {
        Date: '2016-05-04',
        Type: '住宅',
        Address: '翻斗花园',
        HomeNumber: 101,
        HouseSize: '三房两厅',
        Host: 'Jennie'
      },
      {
        Date: '2016-05-01',
        Type: '住宅',
        Address: '翻斗花园',
        HomeNumber: 101,
        HouseSize: '三房两厅',
        Host: 'Jennie'
      }, {
        Date: '2016-05-03',
        Type: '住宅',
        Address: '翻斗花园',
        HomeNumber: 101,
        HouseSize: '三房两厅',
        Host: 'Jennie'
      },
      {
        Date: '2016-05-02',
        Type: '住宅',
        Address: '翻斗花园',
        HomeNumber: 101,
        HouseSize: '三房两厅',
        Host: 'Jennie'
      },
      {
        Date: '2016-05-04',
        Type: '住宅',
        Address: '翻斗花园',
        HomeNumber: 101,
        HouseSize: '三房两厅',
        Host: 'Jennie'
      },
      {
        Date: '2016-05-01',
        Type: '住宅',
        Address: '翻斗花园',
        HomeNumber: 101,
        HouseSize: '三房两厅',
        Host: 'Jennie'
      }, {
        Date: '2016-05-03',
        Type: '住宅',
        Address: '翻斗花园',
        HomeNumber: 101,
        HouseSize: '三房两厅',
        Host: 'Jennie'
      },
      {
        Date: '2016-05-02',
        Type: '住宅',
        Address: '翻斗花园',
        HomeNumber: 101,
        HouseSize: '三房两厅',
        Host: 'Jennie'
      },
      {
        Date: '2016-05-04',
        Type: '住宅',
        Address: '翻斗花园',
        HomeNumber: 101,
        HouseSize: '三房两厅',
        Host: 'Jennie'
      },
      {
        Date: '2016-05-01',
        Type: '住宅',
        Address: '开心冷包蛇',
        HomeNumber: 101,
        HouseSize: '三房两厅',
        Host: 'Jennie'
      }, {
        Date: '2016-05-03',
        Type: '住宅',
        Address: '开心冷包蛇',
        HomeNumber: 101,
        HouseSize: '三房两厅',
        Host: 'Jennie'
      },
      {
        Date: '2016-05-02',
        Type: '住宅',
        Address: '开心冷包蛇',
        HomeNumber: 101,
        HouseSize: '三房两厅',
        Host: 'Jennie'
      },
      {
        Date: '2016-05-04',
        Type: '住宅',
        Address: '开心冷包蛇',
        HomeNumber: 101,
        HouseSize: '三房两厅',
        Host: 'Jennie'
      },
      {
        Date: '2016-05-01',
        Type: '住宅',
        Address: '开心冷包蛇',
        HomeNumber: 101,
        HouseSize: '三房两厅',
        Host: 'Jennie'
      },
    ],
    index: 0,
    row:{},
    date: '',
    houseName: '',
    type: '',
    doorNum: '',
    shape: '',
    host: '',
  },
  getters: {
  },
  mutations: {
    // 修改state的数据
    SET_NAVBOOL(state: any) {
      state.navBool = !state.navBool
    },
    // 修改
    SET_DIALOG(state: any) {
      state.dialogFormVisible = !state.dialogFormVisible
    },
    // 删除
    SET_DEL(state: any, index: number) {
      state.tableData.splice(index,1)
    },
    SHOW_THINGS(state: any,row:any) {
      state.row = JSON.parse(JSON.stringify(row))
    }
    ,
    SET_SET(state: any, obj: any) {
      // 存放变量
      state.date = obj.date
      state.houseName = obj.houseName
      state.type = obj.type
      state.doorNum = obj.doorNum
      state.shape = obj.shape
      state.host = obj.host
    // 修改存放的信息
      state.tableData[state.index].Date = state.date
      state.tableData[state.index].Address=state.houseName
      state.tableData[state.index].Type=state.type
      state.tableData[state.index].HomeNumber=state.doorNum
      state.tableData[state.index].HouseSize=state.shape
      state.tableData[state.index].Host= state.host
      
    },
    SET_INDEX(state: any, index: number) {
      // 当前点击的坐标
      state.index = index
    }
  },
  actions: {
  },
}
export default homeview;